package com.example.demo.ListTest;

import java.util.HashSet;
import java.util.Set;
import java.util.logging.Handler;

/**
 * @author LHH
 * @date 2025/10/20
 */
public class SetTest {
    public static void main(String[] args) {
        Set<String> aaa = new HashSet<>();
        aaa.add("111");
        aaa.add("222");
        aaa.add("333");
        System.out.println("A: " + aaa);
        if (true) {
            Set<String> deleteSet = new HashSet<>();
            deleteSet.add("222");
            aaa.removeAll(deleteSet);
            System.out.println("B: " + aaa);
        }
        if (!aaa.isEmpty()) {

            System.out.println("C: " + aaa);
        }
    }
}
